YES(O(1),O(n^1)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { @([](), xs) -> xs , @(::(x, xs), ys) -> ::(x, @(xs, ys)) , flatten([]()) -> []() , flatten(::(x, xs)) -> @(x, flatten(xs)) } Obligation: runtime complexity Answer: YES(O(1),O(n^1)) The input is overlay and right-linear. Switching to innermost rewriting. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { @([](), xs) -> xs , @(::(x, xs), ys) -> ::(x, @(xs, ys)) , flatten([]()) -> []() , flatten(::(x, xs)) -> @(x, flatten(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add following dependency tuples: Strict DPs: { @^#([](), xs) -> c_1() , @^#(::(x, xs), ys) -> c_2(@^#(xs, ys)) , flatten^#([]()) -> c_3() , flatten^#(::(x, xs)) -> c_4(@^#(x, flatten(xs)), flatten^#(xs)) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { @^#([](), xs) -> c_1() , @^#(::(x, xs), ys) -> c_2(@^#(xs, ys)) , flatten^#([]()) -> c_3() , flatten^#(::(x, xs)) -> c_4(@^#(x, flatten(xs)), flatten^#(xs)) } Weak Trs: { @([](), xs) -> xs , @(::(x, xs), ys) -> ::(x, @(xs, ys)) , flatten([]()) -> []() , flatten(::(x, xs)) -> @(x, flatten(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We estimate the number of application of {1,3} by applications of Pre({1,3}) = {2,4}. Here rules are labeled as follows: DPs: { 1: @^#([](), xs) -> c_1() , 2: @^#(::(x, xs), ys) -> c_2(@^#(xs, ys)) , 3: flatten^#([]()) -> c_3() , 4: flatten^#(::(x, xs)) -> c_4(@^#(x, flatten(xs)), flatten^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { @^#(::(x, xs), ys) -> c_2(@^#(xs, ys)) , flatten^#(::(x, xs)) -> c_4(@^#(x, flatten(xs)), flatten^#(xs)) } Weak DPs: { @^#([](), xs) -> c_1() , flatten^#([]()) -> c_3() } Weak Trs: { @([](), xs) -> xs , @(::(x, xs), ys) -> ::(x, @(xs, ys)) , flatten([]()) -> []() , flatten(::(x, xs)) -> @(x, flatten(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { @^#([](), xs) -> c_1() , flatten^#([]()) -> c_3() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { @^#(::(x, xs), ys) -> c_2(@^#(xs, ys)) , flatten^#(::(x, xs)) -> c_4(@^#(x, flatten(xs)), flatten^#(xs)) } Weak Trs: { @([](), xs) -> xs , @(::(x, xs), ys) -> ::(x, @(xs, ys)) , flatten([]()) -> []() , flatten(::(x, xs)) -> @(x, flatten(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: @^#(::(x, xs), ys) -> c_2(@^#(xs, ys)) , 2: flatten^#(::(x, xs)) -> c_4(@^#(x, flatten(xs)), flatten^#(xs)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {1}, Uargs(c_4) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [[]] = [1] [@](x1, x2) = [1] x1 + [1] [::](x1, x2) = [1] x1 + [1] x2 + [1] [flatten](x1) = [1] [@^#](x1, x2) = [1] x1 + [0] [c_2](x1) = [1] x1 + [0] [flatten^#](x1) = [1] x1 + [1] [c_4](x1, x2) = [1] x1 + [1] x2 + [0] This order satisfies following ordering constraints [@^#(::(x, xs), ys)] = [1] x + [1] xs + [1] > [1] xs + [0] = [c_2(@^#(xs, ys))] [flatten^#(::(x, xs))] = [1] x + [1] xs + [2] > [1] x + [1] xs + [1] = [c_4(@^#(x, flatten(xs)), flatten^#(xs))] The strictly oriented rules are moved into the corresponding weak component(s). We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { @^#(::(x, xs), ys) -> c_2(@^#(xs, ys)) , flatten^#(::(x, xs)) -> c_4(@^#(x, flatten(xs)), flatten^#(xs)) } Weak Trs: { @([](), xs) -> xs , @(::(x, xs), ys) -> ::(x, @(xs, ys)) , flatten([]()) -> []() , flatten(::(x, xs)) -> @(x, flatten(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { @^#(::(x, xs), ys) -> c_2(@^#(xs, ys)) , flatten^#(::(x, xs)) -> c_4(@^#(x, flatten(xs)), flatten^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { @([](), xs) -> xs , @(::(x, xs), ys) -> ::(x, @(xs, ys)) , flatten([]()) -> []() , flatten(::(x, xs)) -> @(x, flatten(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Wall-time: 0.324873s CPU-time: 3.340493s Hurray, we answered YES(O(1),O(n^1))